package com.saxon.springcloud.service;

import com.saxon.springcloud.pojo.Dept;
import feign.hystrix.FallbackFactory;
import org.springframework.stereotype.Component;

@Component
public class DeptClientServiceFallBackFactory implements FallbackFactory {
    @Override
    public Object create (Throwable throwable) {
        return (FeignService) id -> new Dept ().setDeptno (9999).setDeptname ("该服务已经降级");
    }
}
